package com.example.vaadin_trainning;

import java.util.Date;

import com.vaadin.Application;
import com.vaadin.ui.*;
import com.vaadin.ui.Button.ClickEvent;

public class Vaadin_trainningApplication extends Application {
	@Override
	public void init() {
		   final Window mainWindow = 
		      new Window("Vaadin_trainning Application");

		   Label label = new Label("Hello Vaadin user");
		   mainWindow.addComponent(label);

		   mainWindow.addComponent(
		      new Button("What is the time?",
		         new Button.ClickListener() {
		         public void buttonClick(ClickEvent event) {
		            mainWindow.showNotification(
		               "The time is " + new Date());
		         }
				
		      }));
		 
		 setMainWindow(mainWindow);
		 
		}
}
